*********************************************************************************
* Ergebnisse zum Abschnitt "Gruppenunterschiede" IV								*
*********************************************************************************

* Project: 	Sonderheft ZfP
* Authors: 	Matthias Mader
* Date:		Jan 2025

* Data: secEUrity Project, IPSOS supplementary survey 2024

*********************************************************************************

*** Setup
	clear
	set more off            						// Disable partitioned output
	set dp period									// Use comma instead of dot for decimals
	set linesize 80         						// Line size limit to make output more readable
	macro drop _all         						// clear all macros
	set scheme burd, permanent						// set graph scheme, e.g., cleanplots, plottig, plotplainblind, burd3, s1mono
	graph set window fontface "Times New Roman"		// set font in graphs | "Arial" | "Times New Roman"


*** Open clean data set
	use DATA_clean, clear


*** Abbildung 5

	fre QU21_treat

	reg QU21_1 i.QU21_treat
	reg QU21_2 i.QU21_treat
	reg QU21_3 i.QU21_treat
	reg QU21_4 i.QU21_treat
	reg nss_r i.QU21_treat

	reg nss i.gov_id3##i.QU21_treat
	margins, at(gov_id3=(1 2 3 4) QU21_treat=(0 1))

	mplotoffset,  offset(.3) ///
	recast(bar)  plot1opts(barwidth(.2)) plot2opts(barwidth(.2))   ///
		yline(1, lstyle(solid color(gs14))) ///
		yline(1.5, lstyle(solid color(gs14))) ///
		yline(2, lstyle(solid color(gs14))) ///
		yline(2.5, lstyle(solid color(gs14))) ///
		yline(3)  /// 
		yline(3.5, lstyle(solid color(gs14))) ///
		yline(4, lstyle(solid color(gs14))) ///
		yline(4.5, lstyle(solid color(gs14))) ///
		yline(5, lstyle(solid color(gs14))) ///
		title (" ") ///
		xtitle(" ") ///
		xscale(range(.5 (1) 3.5)) ///
		xlabel(1 `" "SPD/" "Grüne/FDP" "' 2 `" "CDU/" "CSU" "'  3 "BSW" 4 "AfD") ///
		ytitle("Durchschnittliche Zustimmung") ///
		legen(order(1 "Ohne Zusatz" 2 "Mit Zusatz") position(1)) ///
		yscale(range(1 (1) 5) lstyle(none)) ylabel(1 (.5) 5) ///
		plotregion(margin(zero) lcolor(none)) ///	
		graphregion(margin(0 1 -8 -10)) ///
		xsize(5) ysize(4)
